Subject: Re: $VER and Workbench Searchpaths
From: [email-masked]
To: [email-masked]
Date: Tue, 27 Jul 93 12:10:41 PDT

>My question was a little different, though.  I'm trying to find out the search
>path for a program that ISN'T Installer.  That is, I'm running a program from
>an icon (any ol' program), and I want that program to have the search path tha
t
>Workbench is using.  How do I get that?  I don't see any convenient way to
>handle it yet.
>
>Y'see, my program accepts an argument to execute a command from within it
>(specifically, my program is a fortune-cookie program, and I am trying to writ
e
>something that will pass a command such as 'more' through to it, so people can
>view the resulting fortune through more.. or muchmore, or a text editor, or
>whatever they want to do with it).  When called from CLI, the spawned CLI
>process gets the same path that the current one has, so I don't have to search
>for it in any way.. AmigaDOS handles it for me.  But, when called from an Icon
,
>my program doesn't have a search-path passed to it (even though Workbench
>itself has a search path within IT, through which it finds the programs it
>needs to run).  I haven't found a way to get that searchpath.
>
>Does anyone know?
>
>- Trey

    I was just looking at some source for a system monitor which iconifies
itslef, and I think I may have found what you are looking for. Under 2.0+ I
think the system sets up some sort of variable as PROGDIR: this is where the
program is. So if you do a lock on PROGDIR: and then look inside, I think you
will find everything. This should work. I know most programs I have that fail
because I run them through ARexx while not in the current directory (strange
way, I know) ask for PROGDIR: (Term, Spot....etc)

 / / /
/_/_/iZ

MODULE 'WiZkId'
PROC main()
  wizkid.inetaddress:=[email-masked]'
  wizkid.realname:='Jeffrey J Peden ]['
ENDPROC

*-- GammaTag Version 2.8 --*
*-- He's dead Jim. Pass the Ketchup!